package com.cans;

/**
 * 终结符表达式
 *
 * @author cans
 * @date 2022/5/14
 **/
public class ValueExpression implements Expression {

    private final String key;

    public ValueExpression(String key) {
        this.key = key;
    }

    @Override
    public int interpret(Context context) {
        return context.getParam(key);
    }
}
